feat(doc test): add missing profile -C options to doc tests#17018
feat(doc test): add missing profile -C options to doc tests#17018QrkenBananen wants to merge 7 commits into
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
eab0a2b to
427b351
Compare
|
I changed the |
This comment has been minimized.
This comment has been minimized.
427b351 to
8a16c6d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
"&Rc<[T]>" doesn't implement IntoIterator, but it can be changed to either "&*Rc<[T]>" or "Rc<[T]>.as_ref()" to allow calling IntoIterator. And the second option seems nicer.
…f &[T] This allows the method to take more types of input, without forcing users to collecting the arguments into a Vec. the method is using AsRef to call OsStr's to_os_string() method, as it actually requires OsStrings. So Into<OsString> seems more clear of the method's requirements. This also have the added benefit that Iterators of owned OsStrings can use the OsString without allocating a new one.
…rocessBuilder::args
Not adding tests for `-C linker` and `-C panic` as these are already covered by `test::panic_abort_doc_tests` and `cross_compile::doctest_xcompile_linker` respectively.
Remove `-C panic` and `-C codegen-linker` from `cargo_test.rs` so the arguments are not passed twice.
8a16c6d to
64be5bd
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
What does this PR try to resolve?
Several -C profile options are missing in doc tests. such as opt-level and debug-assert. This extracts the logic from the regular test's
build_base_argsinto separate functions and calls those from doc test argument collection.Fixes #6570
How to test and review this PR?
Tests have been added that checks if cargo passes the new arguments to rustdoc.